8 function revisar(num : integer) : string;
\r
10 mitad, i, suma : integer;
\r
13 result := 'DEFICIENT'
\r
17 mitad := (num div 2) + 1;
\r
18 for i := 2 to mitad do
\r
19 if num mod i = 0 then
\r
22 result := 'ABUNDANT'
\r
23 else if suma < num then
\r
24 result := 'DEFICIENT'
\r
26 result := 'PERFECT';
\r
34 writeLn('PERFECTION OUTPUT');
\r
38 write(format('%5d', [num]));
\r
40 writeLn(revisar(num));
\r
43 writeLn('END OF OUTPUT');
\r